From ae27c2171d1beeb6cfdcde72c4f095a90d13769f Mon Sep 17 00:00:00 2001 From: robertlipe Date: Fri, 23 Aug 2013 03:48:22 +0000 Subject: [PATCH] Add geocaching coverage to unicsv reader/writer test. --- gpsbabel/reference/gc/GC7FA4~unicsv.csv | 2 ++ gpsbabel/testo.d/unicsv.test | 3 +++ gpsbabel/unicsv.cc | 3 +-- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 gpsbabel/reference/gc/GC7FA4~unicsv.csv diff --git a/gpsbabel/reference/gc/GC7FA4~unicsv.csv b/gpsbabel/reference/gc/GC7FA4~unicsv.csv new file mode 100644 index 000000000..eebb78a4a --- /dev/null +++ b/gpsbabel/reference/gc/GC7FA4~unicsv.csv @@ -0,0 +1,2 @@ +No,Latitude,Longitude,Name,Description,Symbol,Date,Time,URL,GCID,Type,Container,Terrain,Difficulty,Archived,Available,Last Found,Placer,Placer ID +1,46.133333,-73.000000,"GC7FA4","Points geodesiques du Quebec","Geocache",2002/08/15,02:00:00,"http://www.geocaching.com/seek/cache_details.aspx?guid=727f9d2c-f080-41f1-a2c9-a326ead462ed",32676,"Locationless (Reverse) Cache","Virtual",1.0,1.0,"False","True","2005/07/12 02:00:00","Sverdrup2",6293 diff --git a/gpsbabel/testo.d/unicsv.test b/gpsbabel/testo.d/unicsv.test index b31bb986f..fdc971056 100644 --- a/gpsbabel/testo.d/unicsv.test +++ b/gpsbabel/testo.d/unicsv.test @@ -11,3 +11,6 @@ compare ${REFERENCE}/unicsv.gpx ${TMPDIR}/unicsv.gpx gpsbabel -i garmin_txt -f ${REFERENCE}/garmin_txt.txt -x nuketypes,routes,tracks -o unicsv -F ${TMPDIR}/garmin_txt-uni.csv compare ${REFERENCE}/garmin_txt-uni.csv ${TMPDIR}/garmin_txt-uni.csv +gpsbabel -i gpx -f reference/gc/GC7FA4.gpx -o unicsv -F ${TMPDIR}/gcunicsv-1.csv +gpsbabel -i unicsv -f reference/gc/GC7FA4~unicsv.csv -o unicsv -F ${TMPDIR}/gcunicsv-2.csv +compare ${TMPDIR}/gcunicsv-1.csv ${TMPDIR}/gcunicsv-2.csv diff --git a/gpsbabel/unicsv.cc b/gpsbabel/unicsv.cc index 0004845e5..4a66935f1 100644 --- a/gpsbabel/unicsv.cc +++ b/gpsbabel/unicsv.cc @@ -240,8 +240,8 @@ static field_t fields_def[] = { { "avail", fld_gc_is_available, STR_ANY }, { "exported", fld_gc_exported, STR_ANY }, { "found", fld_gc_last_found, STR_ANY }, - { "placer", fld_gc_placer, STR_ANY }, { "placer_id", fld_gc_placer_id, STR_ANY }, + { "placer", fld_gc_placer, STR_ANY }, { "hint", fld_gc_hint, STR_ANY }, #endif { NULL, fld_terminator, 0 } @@ -745,7 +745,6 @@ unicsv_parse_one_line(char* ibuf) break; case fld_url: { - qDebug() << s; UrlLink l(s); wpt->AddUrlLink(l); } -- 2.30.2